﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:markup="clr-namespace:Elysium.Markup"
                    xmlns:params="clr-namespace:Elysium.Parameters">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/Themes/SharedResources.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Ranges/Slider.Resources.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Ranges/Slider.HorizontalTemplate.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Ranges/Slider.VerticalTemplate.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type Slider}">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{markup:ThemeResource NormalBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{markup:ThemeResource ForegroundBrush}"/>
        <Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.ContentFontSize), Mode=OneWay}"/>
        <Setter Property="FontStretch" Value="Medium"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Style.Triggers>            
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="BorderBrush" Value="{markup:ThemeResource DisabledBrush}"/>
            </Trigger>            
            <Trigger Property="Orientation" Value="Horizontal">                
                <Setter Property="MinHeight" Value="14"/>
                <Setter Property="Height" Value="18"/>
                <Setter Property="MaxHeight" Value="22"/>                
                <Setter Property="Template" Value="{StaticResource HorizontalSliderTemplate}"/>
            </Trigger>            
            <Trigger Property="Orientation" Value="Vertical">                
                <Setter Property="MinWidth" Value="14"/>
                <Setter Property="Width" Value="18"/>
                <Setter Property="MaxWidth" Value="22"/>                
                <Setter Property="Template" Value="{StaticResource VerticalSliderTemplate}"/>                   
            </Trigger>            
        </Style.Triggers>
    </Style>

</ResourceDictionary>